﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ZLCMS.Business.DwzFrame;
using NHibernate;
using ZLCMS.Data.Model;
using NHibernate.Criterion;
using ZLCMS.Business.Util;
using DotNet.Common.Command;
using ZLCMS.Commands.User.Commands.ProductSku;

namespace ZLCMS.Web.SystemManage.Basics.ProductSKU
{
    public partial class ProductSkuReset : System.Web.UI.Page
    {
        protected FrameHelper _framePage;

        protected void Page_Load(object sender, EventArgs e)
        {
            //初始化DWZ控件
            _framePage = new FrameHelper(this);
            ICommandResult<ResetSkuProductResult> res = new ResetSkuProductCommand().Execute(new ResetSkuProductParameter()
        {
            ProductNo=Request["pno"]
        });
            if (res.Error)
            {
                _framePage.Alert(
                    new ReturnCode()
                    {
                        statusCode = 300,
                        message = "操作失败-" + res.ErrorMsg
                    }
                    );
            }
            else
            {
                _framePage.Alert(
                    new ReturnCode()
                    {
                        statusCode = 200,
                        message = "重置成功!",
                        navTabId = _framePage.NavTabId
                    }
                    );
            }
        }
    }
}